package com.mathew.spring.appsp.conf;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "spa")
public class Spa {

    private String type;
    private String version;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date time;

    public String getType() {
        return type;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getVersion() {
        return version;
    }

    

    public void setVersion(String version) {
        this.version = version;
    }

    public void setType(String type) {
        this.type = type;
    }
    @Override
    public String toString() {
        return "type:" + this.type + " version:" + this.version;
    }
}
